﻿using System;

namespace Marmat.Forms
{
    public class FileManagerCustomSaveingEventArgs : EventArgs
    {
        public FileManagerCustomSaveingEventArgs(FileManagerCustomSaveItem[] files)
        {
            this.Files = files;
        }

        /// <summary>
        /// 需要操作的文件数组。
        /// </summary>
        /// <returns></returns>
        public FileManagerCustomSaveItem[] Files { get; private set; }
    }

    public class FileManagerCustomSaveItem
    {
        public FileManagerCustomSaveItem(FileItem item, FileManagerItemStatusEnum status)
        {
            this.Item = item;
            this.Status = status;
        }

        /// <summary>
        /// 获取需要操作的文件对象。
        /// </summary>
        /// <returns></returns>
        public FileItem Item { get; private set; }

        /// <summary>
        /// 获取需要操作的对象的状态。
        /// </summary>
        /// <returns></returns>
        public FileManagerItemStatusEnum Status { get; private set; }

        /// <summary>
        /// 操作是否成功。
        /// </summary>
        /// <returns></returns>
        public bool Succeed { get; set; }
    }

    public enum FileManagerItemStatusEnum
    {
        /// <summary>
        /// 添加
        /// </summary>
        Add = 1,
        /// <summary>
        /// 删除
        /// </summary>
        Delete = 2
    }
}